<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>EPAC Admin</title>
<link rel="stylesheet" href='<?php echo $this->baseUrl()?>/public/css/admin_style.css'/>
<link rel="stylesheet" href='<?php echo $this->baseUrl()?>/public/css/admin_home.css'/>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
</head>
<body>
	<header>
   	  <img src='<?php echo $this->baseUrl()?>/public/images/logo.png' class='logo'/>
    </header>
    <div class='wrap-body'>
        <div class='wrap-left-menu'>
            <ul id='admin-menu'>
                <a href='<?php echo $this->baseUrl() ?>/admin' <?php echo $this->active_menu == 'home' ? "class='active-admin-menu'" : ""?>>
                    <li class='home-settings main-menu'>
                        <div class='menu-image'></div>
                        <div class='menu-text'>Home Settings</div>
                    </li>
                </a>
                <a href='javascript:void(0)' <?php echo $this->active_menu == 'service' ? "class='active-admin-menu'" : ""?>>            
                    <li class='service-settings main-menu'>
                        <div class='menu-image'></div>
                        <div class='menu-text'>Services</div>
                    </li>     
                </a>
                <ul class='wrap-sub-menu'>
                    <?php foreach($this->services as $key => $name ): ?>
                        <a href='<?php echo $this->baseUrl() ?>/admin/index/service?type=<?php echo $key ?>' 
                            <?php echo ($this->active_menu == 'service' && $this->active_submenu == $key) ? "class='active-sub-menu'" : "" ?>>
                            <li class='sub-menu'>
                                <?php echo $name ?>
                            </li>
                        </a>
                    <?php endforeach;?>
                </ul>
                <a href='<?php echo $this->baseUrl() ?>/admin/index/about'
                   <?php echo $this->active_menu == 'about' ? "class='active-admin-menu'" : "" ?>>
                    <li class='about-settings main-menu'>
                        <div class='menu-image'></div>
                        <div class='menu-text'>About Us</div>
                    </li>
                </a>        
                <a href='<?php echo $this->baseUrl() ?>/admin/index/emailsetting'
                   <?php echo $this->active_menu == 'emailsetting' ? "class='active-admin-menu'" : "" ?>>
                    <li class='email-settings main-menu'>
                        <div class='menu-image'></div>
                        <div class='menu-text'>Email Settings</div>
                    </li>  
                </a>
                <a href='javascript:void(0)' <?php echo $this->active_menu == 'users' ? "class='active-admin-menu'":""?>>            
                    <li class='user-settings main-menu'>
                        <div class='menu-image'></div>
                        <div class='menu-text'>Users</div>
                    </li>    
                </a>                        
                <ul class='wrap-sub-menu'>
                    <a href='<?php echo $this->baseUrl()?>/admin/index/users' <?php echo $this->active_menu == 'users' && $this->active_submenu == 'list_user' ? "class='active-sub-menu'" : ""?>>
                        <li class='sub-menu'>
                            List Users
                        </li>
                    </a>
                    <a href='<?php echo $this->baseUrl()?>/admin/index/newuser' <?php echo $this->active_menu == 'users' && $this->active_submenu == 'new_user' ? "class='active-sub-menu'" : ""?>>
                        <li class='sub-menu'>
                            Add New User
                        </li>
                    </a>
                </ul>                
                <a href='javascript:void(0)' <?php echo $this->active_menu == 'ports' ? "class='active-admin-menu'" : ""?>>            
                    <li class='port-settings main-menu'>
                        <div class='menu-image'></div>
                        <div class='menu-text'>Port - Buoy</div>
                    </li>  
                </a>  
                <ul class='wrap-sub-menu'>
                    <?php $list_port_url = $this->url(array('action' => 'ports'));?>
                    <a href='<?php echo $list_port_url ?>' 
                        <?php echo $this->active_menu == 'ports' && $this->active_submenu == 'list_port' ? "class='active-sub-menu'" : ""?>>
                        <li class='sub-menu'>
                            List Ports
                        </li>
                    </a>
                    <?php $list_buoys_url = $this->url(array('action' => 'buoys'));?>
                    <a href='<?php echo $list_buoys_url ?>' <?php echo $this->active_menu == 'ports' && $this->active_submenu == 'list_buoy' ? "class='active-sub-menu'": ""?>>
                        <li class='sub-menu'>
                            List Buoys
                        </li>
                    </a>
                </ul>                      
                <a href='javascript:void(0)' <?php echo $this->active_menu == 'material' ? "class='active-admin-menu'" : ""?>>
                    <li class='material-settings main-menu'>
                        <div class='menu-image'></div>
                        <div class='menu-text'>Material</div>
                    </li>  
                </a>
                <ul class='wrap-sub-menu'>
                    <?php foreach($this->materials as $key => $name ): ?>
                        <a href='<?php echo $this->baseUrl() ?>/admin/index/material?type=<?php echo $key ?>'
                            <?php echo ($this->active_menu == 'material' && $this->active_submenu == $key) ? "class='active-sub-menu'" : "" ?>>
                            <li class='sub-menu'>
                                <?php echo $name ?>
                            </li>
                        </a>
                    <?php endforeach;?>
                </ul>
            </ul>
        </div>
        <div class='wrap-main-content'>
            <div class='main-content'>
                <?php echo $this->layout()->content ?>
            </div>
        </div>
    </div>
    <script src='<?php echo $this->baseUrl() ?>/public/js/admin/main.js'></script>
    <script>
        var base_url = '<?php echo $this->baseUrl() ?>';
    </script>
</body>
</html>
